package cn.lzb.book.server.common.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author liuzhibo
 * @date 2024/8/28 16:12
 **/
public abstract class BaseExceptionEnums {

    /**
     * 通用异常
     */
    @Getter
    @AllArgsConstructor
    public enum Common implements BaseException {
        SERVER_ERROR(10001, "服务器异常，请联系管理员"),
        PARAMS_MISS(10002, "参数校验不通过"),
        PERMISSION_DENIED(10003,"权限不足，请授权后重新操作"),
        DATA_MISS(10004,"查询数据不存在"),
        ;
        private final int code;
        private final String message;
    }

    @Getter
    @AllArgsConstructor
    public enum Book implements BaseException {
        BOOK_NOT_EXIST(20001, "当前图书不存在"),
        BOOK_ALREADY_EXIST(20002, "存在重复的数据"),

        ;
        private final int code;
        private final String message;
    }



}

